<!doctype html>
<html>
  <head>
    <script type='text/javascript'>
       function getVariable(string, variable) {
         var vars = string.split('&');
         for (var i = 0; i < vars.length; i++) {
             var pair = vars[i].split('=');
             if (decodeURIComponent(pair[0]) == variable) {
                 return decodeURIComponent(pair[1]);
             }
         }

        return undefined;
       }

       function getQueryVariable(variable) {
         var query = window.location.search.substring(1);
         return getVariable(query, variable);
       }

       var result = {
        token: getQueryVariable('oauth_token'),
        verifier: getQueryVariable('oauth_verifier')
       };

       window.opener.RAML.authorizationSuccess(result);
       window.close();
    </script>
  </head>
  <body>
  </body>
</html>
